import tkinter as tk
import plant_info_page
import role_info_page
import monitoring_info_page
import maintenance_info_page
import pymssql
#上级管理部门的功能页面
# higher_superior.py
def open_higher_superior(entry1_value):
    window = tk.Tk()
    window.title("上级主管部门-" + entry1_value)
    window.geometry("400x200")

    label = tk.Label(window, text="欢迎来到上级主管页面！")
    label.pack()

    # 创建四个按钮，关联对应的函数
    button_plant_info = tk.Button(window, text="植物信息", command=lambda: plant_info_page.open_plant_info(entry1_value), width=20, height=1)
    button_role_info = tk.Button(window, text="角色信息", command=lambda: role_info_page.open_role_info(entry1_value), width=20, height=1)
    button_monitoring_info = tk.Button(window, text="监测信息", command=lambda: monitoring_info_page.open_monitoring_info(entry1_value), width=20, height=1)
    button_maintenance_info = tk.Button(window, text="养护信息", command=lambda: maintenance_info_page.open_maintenance_info(entry1_value), width=20, height=1)

    button_plant_info.pack()
    button_role_info.pack()
    button_monitoring_info.pack()
    button_maintenance_info.pack()

    window.mainloop()
